﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QXBook.Utils;

namespace QXBook.Model
{
    public class VideoInfo : CoreTemplate, IModelBase
    {
        public int VideoID{get;set;}

        public string VideoPath { get; set; }
        public string VideoUrl { get; set; }

        public YesNo IsNeedScore { get; set; }

        public VideoType VideoType { get; set; }

        public float Score { get; set; }

        public string GetUrl()
        {
            return string.IsNullOrEmpty(VideoUrl) ? System.Web.HttpContext.Current.Server.MapPath(VideoPath) : VideoUrl;
        }

        public int ID
        {
            get { return VideoID; }
        }
    }
}
